export default {
	data() {
		return {
            member_id:0,
            avatar_url:'',
            uid:'',
            timestamp:'',
            daynum:'',
            user_level_name:'',
            authorization:'',
            nickname:'',
            real_name:'',
            card_no:'',
            mobile:'',
            gender:'',
            birthday:'',
            praise_count:'',
            review_count:'',
            bad_count:'',
            order_success_count:'',
            total_pay:'',
            member_remarks:'',
            is_certification:""
		}
	},
	//进入页面加载
	mounted: function() {
        var that = this;
        //在缓存中获取值
        that.user_name = sessionStorage.getItem("user_name");
        that.user_id = sessionStorage.getItem("user_id");
        that.token = sessionStorage.getItem("access-token");
        if ((!that.token) || (!that.user_id) || (!that.user_name)) {
            that.$router.push('/login');
        }
        if (that.$route.query.member_id) {
            that.member_id = that.$route.query.member_id;
            that.getDetail();
        }
	},
	methods: {
        /**
		 * 加载详情
         */
        getDetail:function () {
            var that = this;
            //请求接口
            that.$http.post(that.adminApi.api_url + "/api/userman/userfiles", {
                token: that.token,
				id:that.member_id
            }, {
                emulateJSON: true
            }).then(
                function (res) {
					that.avatar_url = res.body.avatar_url;
					that.uid = res.body.user_no;
					that.timestamp = res.body.timestamp;
					that.daynum = res.body.daynum;
					that.user_level_name = res.body.user_level_name;
					that.authorization = res.body.authorization;
					that.is_certification = res.body.is_certification;
					that.nickname = res.body.nickname;
					that.real_name = res.body.real_name;
					that.card_no = res.body.card_no;
					that.mobile = res.body.mobile;
					that.gender = res.body.gender;
					that.birthday = res.body.birthday;
					that.praise_count = res.body.praise_count;
					that.review_count = res.body.review_count;
					that.bad_count = res.body.bad_count;
					that.order_success_count = res.body.order_success_count;
					that.total_pay = res.body.total_pay;
					that.member_remarks = res.body.remarks;

                },
                function () {
                    // 处理失败的结果
                    that.$message({
                        type: 'error',
                        message: `操作提示: ${ '处理异常' }`
                    });
                });
        }
	}
}